#####################################################################################################################################
# Can courts in non-democracies deter election fraud? De jure judicial independence, political competition, and election integrity ##
# Cole J. Harvey                                                                                                              #######
# American Political Science Review                                                                                           #######
# README file                                                                                                                 #######
#####################################################################################################################################


This file outlines the replication code and data for the above article. The replication file contains:

 - This README

 - Online Appendix B
 
 - Three datasets:
	- harvey_courts_manipulation_main_data.csv contains the data used in the analysis for the main text
	- harvey_courts_manipulation_appendix_data.csv contains the data used for most of the supplementary analyses in the appendix
	- harvey_courts_manipulation_appendix_data_altdem.csv contains the data used for analyses using the alternative democracy coding scheme from Cheibub et al. (2010)

 - Three R notebooks containing the replication code:
	- harvey_courts_manipulation_main_code.Rmd contains the code to replicate the anaysis for the main text
	- harvey_courts_manipulation_appendix_code.Rmd contains the code to replicate the supplementary analyses, with the exception of the alternative democracy coding
	- harvey_courts_manipulation_altdem_code.Rmd contains the code to replicate the analyses using the alternative coding of democracy

Additional info:

	- These analysis were most recently completed by the author using R version 4.0.3. 
	- Most variables are drawn from V-Dem, and can be looked up in the codebook available here: https://www.v-dem.net/vdemds.html 
	- Some variables are renamed / transformed in the code above
	- Other variables are taken from additional datasets, including NELDA, the Database of Political Institutions, and the Comparative Constitutions Project:
		- govshare is created by dividing NUMGOV by TOTALSEATS (both from DPI)
		- citizen.access is created by adding the variables challeg_7, challeg_8 and amparo from the CCP dataset
			- ccp_positive_reform_access takes on a value of 1 when citizen.access is greater than its 1-year lagged value
		- To replicate the protest analysis from the appendix, you will need access to the NELDA data, which can be requested here: https://nelda.co/#access 
		
